﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FreedomERP.Dao.Inv;
using FreedomERP.Dao.Inv.Impl;
using FreedomERP.Models;

namespace FreedomERP.Services.Inv.Impl
{
    /// <summary>
    /// 送货单明细业务层实现类
    /// 作者：姚少鹏
    /// </summary>
    public class InvSendOrderDetailServiceImpl : IInvSendOrderDetailService
    {
        IInvSendOrderDetailDao sendOrderDetailDao = new InvSendOrderDetailDaoImpl();

        /// <summary>
        /// 添加送货单明细
        /// </summary>
        /// <param name="sendOrderDetail"></param>
        public void addSendOrderDetail(InvSendOrderDetail sendOrderDetail)
        {
            sendOrderDetailDao.addSendOrderDetail(sendOrderDetail);
        }

        /// <summary>
        /// 删除送货单明细
        /// </summary>
        /// <param name="sendOrderDetail"></param>
        public void delSendOrderDetail(InvSendOrderDetail sendOrderDetail)
        {
            sendOrderDetailDao.delSendOrderDetail(sendOrderDetail);
        }

        /// <summary>
        /// 更新送货单明细
        /// </summary>
        /// <param name="sendOrderDetail"></param>
        public void updateSendOrderDetail(InvSendOrderDetail sendOrderDetail)
        {
            sendOrderDetailDao.updateSendOrderDetail(sendOrderDetail);
        }

        /// <summary>
        /// 根据FId获取送货单明细
        /// </summary>
        /// <param name="FId"></param>
        /// <returns></returns>
        public InvSendOrderDetail getSendOrderDetailByFId(string FId)
        {
            return sendOrderDetailDao.getSendOrderDetailByFId(FId);
        }

        /// <summary>
        /// 根据FParentId获取送货单明细列表
        /// </summary>
        /// <param name="FParentId"></param>
        /// <returns></returns>
        public List<InvSendOrderDetail> getSendOrderDetailListByFParentId(string FParentId)
        {
            return sendOrderDetailDao.getSendOrderDetailListByFParentId(FParentId);
        }

        /// <summary>
        /// 获取送货单明细列表
        /// </summary>
        /// <returns></returns>
        public List<InvSendOrderDetail> getSendOrderDetailList()
        {
            return sendOrderDetailDao.getSendOrderDetailList();
        }
    }
}